package homework3;

public class Aircraft extends Machine implements Voyageable,Roadable,Flyable{

	public Aircraft(int energy) {
		super(100);
	}

	@Override
	public void fly() {
		this.setEnergy(super.getEnergy()-25);	
		System.out.println("成功执行一次空中飞行操作!当前剩余能量："+this.getEnergy());
	}

	@Override
	public void run() {
		this.setEnergy(super.getEnergy()-10);
		System.out.println("成功执行一次陆地驾驶操作!当前剩余能量："+this.getEnergy());
	}

	@Override
	public void voyage() {
		this.setEnergy(super.getEnergy()-15);
		System.out.println("成功执行一次水中航行操作!当前剩余能量："+this.getEnergy());
	}
	

	
}
